﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.DB_Model.YWDF
{
    /// <summary>
    /// 业务订房记录信息
    /// </summary>
    [Serializable]
    public class ywdf_order
    {
        #region 数据表名称
        public static readonly string TableName = "ywdf_order";
        #endregion

        #region 数据表字段结构
        public struct Columns
        {
            /// <summary>
            /// id
            /// </summary>
            public static readonly string id = @"id";

            /// <summary>
            /// 订房开始时间
            /// </summary>
            public static readonly string order_date_bgn = @"order_date_bgn";

            /// <summary>
            /// 订房结束时间
            /// </summary>
            public static readonly string order_date_end = @"order_date_end";

            /// <summary>
            /// 订房所属项目ID
            /// </summary>
            public static readonly string order_project_id = @"order_project_id";

            /// <summary>
            /// 订房部门ID
            /// </summary>
            public static readonly string order_department_id = @"order_department_id";

            /// <summary>
            /// 订房时间
            /// </summary>
            public static readonly string order_date = @"order_date";

            /// <summary>
            /// 订房用户ID
            /// </summary>
            public static readonly string order_user_id = @"order_user_id";

            /// <summary>
            /// 订房描述
            /// </summary>
            public static readonly string order_describe = @"order_describe";

            /// <summary>
            /// 审批用户ID
            /// </summary>
            public static readonly string confirm_user_id = @"confirm_user_id";

            /// <summary>
            /// 审批描述
            /// </summary>
            public static readonly string confirm_describe = @"confirm_describe";

            /// <summary>
            /// 审批时间
            /// </summary>
            public static readonly string confirm_date = @"confirm_date";

            /// <summary>
            /// 是否有效标志
            /// </summary>
            public static readonly string is_valid = @"is_valid";

            /// <summary>
            /// 创建时间
            /// </summary>
            public static readonly string create_date = @"create_date";
        }
        #endregion

        #region 字段
        /// <summary>
        /// 记录ID
        /// </summary>
        public virtual string id { get; set; }

        /// <summary>
        /// 订房开始时间
        /// </summary>
        public virtual DateTime order_date_bgn { get; set; }

        /// <summary>
        /// 订房结束时间
        /// </summary>
        public virtual DateTime order_date_end { get; set; }

        /// <summary>
        /// 订房所属项目
        /// </summary>
        public virtual DB_NH.DB_Model.ywxt.t_project order_project { get; set; }

        /// <summary>
        /// 订房部门
        /// </summary>
        public virtual DB_NH.DB_Model.ywxt.t_sys_department order_department { get; set; }

        /// <summary>
        /// 订房时间
        /// </summary>
        public virtual DateTime order_date { get; set; }

        /// <summary>
        /// 订房用户
        /// </summary>
        public virtual DB_NH.DB_Model.ywxt.t_sys_user order_user { get; set; }

        /// <summary>
        /// 订房描述
        /// </summary>
        public virtual string order_describe { get; set; }

        /// <summary>
        /// 审批时间
        /// </summary>
        public virtual DateTime? confirm_date { get; set; }

        /// <summary>
        /// 审批用户
        /// </summary>
        public virtual DB_NH.DB_Model.ywxt.t_sys_user confirm_user { get; set; }

        /// <summary>
        /// 审批描述
        /// </summary>
        public virtual string confirm_describe { get; set; }

        /// <summary>
        /// 订单详细记录
        /// </summary>
        public virtual IList<ywdf_order_detail> details { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        public virtual int is_valid { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime create_date { get; set; }
        #endregion

        public ywdf_order()
        {
            details = new List<ywdf_order_detail>();
        }
    }
}

